import java.util.Scanner;

public class Main {
    public static void main(String[] args) {//拐角四
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        for(int i=n; i>0; i--){
            for(int j=n; j>0; j--){
                if(i<=j){
                    System.out.printf("%3d",n-i+1);
                }
                else{
                    System.out.printf("%3d",n-j+1);
                }
            }
            System.out.println();
        }
    }
    public static void main1(String[] args) {//拐角三
        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt();
        for(int i=0;i<n;i++){
            for(int j=0;j<n;j++){
                if(i<=j){
                    System.out.printf("%3d",n-i);
                }
                else{
                    System.out.printf("%3d",n-j);
                }
            }
            System.out.println();
        }
    }
}